package org.thanos.demo.listener;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.event.EventListener;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;
import org.thanos.demo.entity.Demo;

@Component
public class DemoListener {

    private static final Logger LOGGER = LoggerFactory.getLogger(DemoListener.class);

    @Async
    @EventListener
    public void listen(Demo demo) {
        LOGGER.info(demo.toString());
    }
}
